<?php

require_once "../library/Core/Bootstrup/Abstract.php";

class Bootstrup extends Core_Bootstrup_Abstract
{

    protected $_configs = array();

    public function _initConfigs()
    {
        $this->_configs = Registry::getInstance()->configs;
    }


    public function _initAutoloader()
    {
        require_once BASE . '/library/Autoloader.php';
        $autoloader = Autoloader::getInstance();
        $autoloader->setLibraries( $this->_configs['autoloader'] );
    }

    public function _initDb()
    {
//        echo "this is db";
    }

    public function _initLayout()
    {
        $static = new Core_Static();
        $static->setConfigs( $this->_configs['static'] );

        $layout = new Core_Layout_Smarty( $this->_configs['layouts'] );
        $layout->setStatic( $static );

        $this->getApplication()->setLayout( $layout );

    }

}

?>
